package com.demo.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;

/**
 * @author zhiqiang
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Document(indexName = "people_index") // 用于创建索引
public class People {
    @Id
    @Field(name = "id")
    private String id;
    @Field(name = "name")
    private String name;
    @Field(name = "age")
    private String age;
}
